package com.tools.security.utils;

import com.tools.commons.exceptions.BadRequestException;
import com.tools.security.context.SecurityContextHolder;

public class IsDoctor {
    public static void check() {
        if (!SecurityContextHolder.getContext().getUserInfo().isDoctor()) {
            throw new BadRequestException("无权限");
        }
    }
}
